import request from '@/utils/request'

// 查询购物车列表
export function listPurchcar(query) {
  return request({
    url: '/supply/purchcar/list',
    method: 'get',
    params: query
  })
}

// 查询购物车详细
export function getPurchcar(carId) {
  return request({
    url: '/supply/purchcar/' + carId,
    method: 'get'
  })
}

export function selectByproductId(productId) {
  return request({
    url: '/supply/purchcar/selectByproductId',
    method: 'get',
    params: {
      productId:productId
    }
  })
}

// 新增购物车
export function addPurchcar(data) {
  return request({
    url: '/supply/purchcar',
    method: 'post',
    data: data
  })
}

// 修改购物车
export function updatePurchcar(data) {
  return request({
    url: '/supply/purchcar',
    method: 'put',
    data: data
  })
}

// 删除购物车
export function delPurchcar(carId) {
  return request({
    url: '/supply/purchcar/' + carId,
    method: 'delete'
  })
}

// 获取购物车客户ID
export function getCustomerId() {
  return request({
    url: '/supply/purchcar/customerId',
    method: 'get'
  })
}




